<template>
  <!-- 板块统计 -->
  <el-row class="clearfix">
    <!-- <h1>Welcome</h1>
    <span>{{' 路由传参:'+plateType}}</span>
    <span>{{' 全局变量:'+$store.state.plateType}}</span> -->
    <Plate/>
  </el-row>
  
</template>

<script>
import Plate from "../../../components/fore/plate/Plate"
import Navtab from "../../../components/fore/common/Navtab"

export default {
  props:['plateType'],
  data() {
    return {}
  },
  computed:{
    watchURLChange(){

    }
  },
  // 利用侦听器监测参数变化，只要发生变化，立即将vuex中的参数更新
  watch:{
    plateType:function(newVal,oldVal){
      // this.sCode=newVal
      // this.stockID
      // this.indexCode=newVal;
      // console.log(this.indexCode);
    this.$store.commit('setPlateType',newVal)

    }
  },
  // 将路由参数(板块类别)赋给vuex
  created:function () {
    this.$store.commit('setPlateType',this.plateType)
  },
  components:{
    Navtab,
    Plate
  }
}
</script>

<style>
</style>
